<template>
  <div class="filter-container">
    <el-input
      v-model="listQuery.acode"
      placeholder="A股代码"
      style="width: 200px"
      class="filter-item"
    />

    <el-button
      class="filter-item"
      type="primary"
      icon="el-icon-search"
      @click="handleFilter"
    >
      Search
    </el-button>
  </div>
  <div>
    <stockindex-chart :acode="chartQuery.acode" />
  </div>
</template>

<script>
import { ref, reactive, toRefs, onMounted } from "vue";
import stockindexChart from "@/components/Charts/stockindexChart.vue";
export default {
  name: "",
  components: {
    stockindexChart,
  },
  setup() {
    const state = reactive({
      listQuery: { acode: "002095" },
      chartQuery: { acode: "002095" },
    });
    const handleFilter = () => {
      state.chartQuery.acode = state.listQuery.acode;

    };
    return { ...toRefs(state), handleFilter };
  },
};
</script>

<style>
</style>